package xormx

import (
	"rdbmsx/config"

	_ "github.com/go-sql-driver/mysql"
	"gorm.io/driver/postgres"
	"gorm.io/gorm"
)

func GetEngine(dsn string) (*gorm.DB, error) {
	open, err := gorm.Open(postgres.Open(config.PostgresDSN), &gorm.Config{})
	if err != nil {
		panic(err)
	}
	return open, nil
}
